/**
 * @file
 * This file contains a string implementation
 */

#ifndef __EXSTRING_H
#define __EXSTRING_H

#ifndef __EXMALLOC_H
# error "Please include exmalloc.h before exstring.h"
#endif /* __EXMALLOC_H */

#ifndef __UTIL_H
# error "Please include util.h before exstring.h"
#endif /* __UTIL_H */

typedef void* string;

inline void str_clear(string str);

inline void str_new(string *str, const char *text, int count);

inline void str_set(string str, const char *text, int count);

inline void str_cat(string str, const char *text, int count);

inline void str_trunk(string str, int count);

inline void str_free(string *str);

inline char *str_tochar(const string str);
  
inline int str_size(const string str);
  
inline int str_empty(const string str);

#endif /* __EXSTRING_H */
